<!DOCTYPE html>
<html>
		<meta charset="UTF-8">
		<title></title>
		<style>
			.fileUpload {
				position: relative;
				overflow: hidden;
				top:0;
				left:6px;

			}
			.up-img{
				position: relative;
				overflow: hidden;
			}
			.up-img input.upload{
				position: absolute;
				top: 0;
				right: 0;
				margin: 0;
				padding: 0;
				font-size: 20px;
				cursor: pointer;
				opacity: 0;
				filter: alpha(opacity=0);
			}
			#img-content{
				width: 100px;
				height: 100px;
				float: left;
			}
			#img-content img{
				width: 100%;
				height:100%;
				cursor:pointer
			}
			.fileUpload input.upload {
				position: absolute;
				top: 0;
				left: 0;
				margin: 0;
				padding: 0;
				font-size: 20px;
				cursor: pointer;
				opacity: 0;
				filter: alpha(opacity=0);
			}

			.position-block{
				padding-left: 106px;
				line-height: 1.4;
			}
			.backdrop img{
				line-height: 100%;

			}


		</style>

	</head>
	<body style="background-color: #f6f6f6;font-family: '微软雅黑';">			
		<div id="header">
			<%include t_header.ejs%>
		</div>
		<div id="side">
			<%include t_side.ejs%>
		</div>
		<div style="margin-left: 200px;margin-top: 52px;">
		<h2 id="page-title" style="font-size: 23px;font-weight: 400;padding: 9px 15px 4px 0;line-height: 29px;margin-top: 0;font-family: '微软雅黑';">新建新闻</h2>
				<form id="post-form" class="form-horizontal" role="form" style="padding-left: 10px;">
					<input type="hidden" id="postId" name="postId">
			<div class="col-sm-9">

				<div class="form-group">
					<input type="text" class="form-control required" id="postTitle" name="postTitle" placeholder="在此填写标题" style="font-weight: 500;font-size: 18px; height: 42px;" title="还没有写标题呢~^_^">
				</div>		<div class="form-group">
				<div class="panel panel-default" style="margin-bottom: 6px">
					<div class="panel-heading">
						<h3 class="panel-title">新闻标题图片</h3>
					</div>
					<div class="panel-body">
						<div class="col-sm-12" style="padding-left: 0">
							<div class="r-input">
								<div id='img-content' title="点击可预览图片">
									<img id="pimg" > </img>
								</div>
								<div class="fileUpload">
									<span id="up-img" class="btn btn-default btn-sm">上传图片</span>
									<input type="file" name="fileToUpload" id="fileToUpload" class="fileupload upload pup" value="上传图片">
								</div>
								<p class="position-block">支持 JPG、PNG、GIF 格式，<br>大小不超过 2M 。</p>
							</div>
						</div>
					</div>
				</div>
			</div>


				<div class="form-group">
					<input type="hidden" id="postContent" name="postContent" />
					<script id="editor" type="text/plain" style="height:500px;width:100%">
					</script>
				</div>
			</div>
			<div class="col-sm-3" style="padding-left: 25px;">
				<div class="error alert alert-danger" style="display:none;"></div>
				<div class="panel panel-default">
					<div class="panel-heading">
						<h3 class="panel-title">分类</h3>
					</div>
					<div class="panel-body">
						<div class="form-group">
							<label class="col-sm-3 control-label">消息分类</label>
							<div class="col-sm-5">
								<select class="form-control input-sm" id="type" name="type">
									<option value="0">分类1</option>
									<option value="1" >分类2</option>
									<option value="2">分类3</option>
								</select>
							</div>
						</div>
					</div>

				</div>

				<div class="panel panel-default">
					<div class="panel-heading">
						<h3 class="panel-title">状态</h3>
					</div>
					<div class="panel-body">
						<div class="form-group">
							<label class="col-sm-3 control-label">是否有效</label>
							<div class="col-sm-9 " id="flag">
								<div class="radio abc-radio pull-left" style="margin-right: 40px;">
									<input type="radio" name="flag" id="yes" value="0" checked>
									<label for="yes">是 </label>
								</div>
								<div class="radio abc-radio">
									<input  type="radio" name="flag" id="no" value="1" >
									<label for="no">否</label>
								</div>
							</div>
						</div>
					</div>
				</div>
				<div class="panel-default">
					<div>
						<button id="post-submit" class="btn btn-primary btn-sm pull-right" type="button">保 存</button>
					</div>

				</div>

			</div>
		</form>
</div>
	</body>
		<script type="text/javascript">
          requirejs(['../js/app/admin/post-form-page.js'])

		</script>
</html>